<?php
/**
 * Created by lzl
 * Date: 2021 2021/9/28
 * Time: 10:36
 */

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


Route::group(['middleware' => ['auth', 'user' ], 'namespace' => 'App\\Plugins\\Controllers\\Api'], function ($r) {
    /**
     * @var $r Route
     */
    $r->group(['prefix' => 'api/plugins'], function ($r){
        /**
         * @var $r Route
         */
        $r->group(['prefix' => 'share-free'], function ($r){
            /**
             * @var $r Route
             */
            $r->post('generate', 'ShareFreeOrderController@generate');

            $r->post('list', 'ShareFreeOrderController@shareList');

            $r->post('share', 'ShareFreeOrderController@share');

            $r->post('confirm-preview', 'ShareFreeOrderController@confirmPreview');

        });
    });

});